{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1414
  Verdict: Accepted
}
uses 
	SysUtils, Math;
 
var
	i,n,kk:longint;
	a:array[-10..20] of boolean;
 
procedure put(n:longint);
begin 
if n>0 then a[n]:=true else a[abs(n)]:=false;
write(n,' ');
end;
 
procedure del(n:longint);
 
var
	kk,i:longint;
	f:boolean;
 
begin
if n=1 then begin
	if a[1] then put(-1);
	exit;
end else 
if n=2 then begin
	if not a[1] then put(1);
	if a[2] then put(-2);
	if a[1] then put(-1);
	exit;
end else begin
	kk:=n-1;
	f:=true;
	while f do begin
		if kk<2 then break else begin
			if not a[1] then put(1);
			for i:=2 to kk do begin
				if not a[i] then put(i);
				if a[i-1] then del(i-1);
			end;
			dec(kk);		
		end; 
	end;
	for i:=1 to n-2 do
		if a[i] then del(i);
	put(-n); 
	for i:=1 to n do
		if a[i] then del(i);
end;
end;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
fillchar(a,sizeof(a),0);
kk:=n-1;
while true do begin
	if kk=0 then begin
		if not a[1] then put(1);
		break;
	end else 
	if kk=1 then begin
		if not a[1] then put(1);
		if not a[2] then put(2);
		break;
	end else begin
		if not a[1] then put(1);
		for i:=2 to kk do begin
			if not a[i] then put(i);
			if a[i-1] then del(i-1);
		end;
		if not a[kk+1] then put(kk+1);
		dec(kk,2);		
	end;
end;
end.